class PortalRenderer : public IBlockRenderer
{
public:
	ITexture *Texture;

	PortalRenderer(ITexture *texture) :
		Texture(texture)
	{
	}

	int GetTypeData(const int &data) { return data; }

	void Render(Schematic *schematic, RendererBase *renderer, const Block &block, const Point3i &position)
	{
		auto &north = schematic->GetBlock(position.X, position.Y, position.Z + 1);
		auto &south = schematic->GetBlock(position.X, position.Y, position.Z - 1);
		auto &east = schematic->GetBlock(position.X + 1, position.Y, position.Z);
		auto &west = schematic->GetBlock(position.X - 1, position.Y, position.Z);

		if (north != Block::Empty ||
			south != Block::Empty)
			renderer->Draw(Box(Texture, Point3i(4, 16, 16), Point3i(6, 0, 0)).SetCoordsFromBounds(Point2i(0, 0)));
		else if (east != Block::Empty ||
			west != Block::Empty)
			renderer->Draw(Box(Texture, Point3i(16, 16, 4), Point3i(0, 0, 6)).SetCoordsFromBounds(Point2i(0, 0)));
	}
};